package com.stylefeng.guns.modular.system.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 问题
 * </p>
 *
 * @author yinjc123
 * @since 2018-04-10
 */
@TableName("crm_qa")
public class Qa extends Model<Qa> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 问题
     */
    @NotBlank(message = "问题不能为空")
    private String question;
    /**
     * 答案
     */
    private String answer;
    /**
     * 分类
     */
    @TableField("type_code")
    @NotNull(message = "分类不能为空")
    private String typeCode;
    /**
     * 时间
     */
    @TableField("create_time")
    @Null(message = "")
    private Date createTime;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getQuestion() {
        return question;
    }

    public void setQuestion(String question) {
        this.question = question;
    }

    public String getAnswer() {
        return answer;
    }

    public void setAnswer(String answer) {
        this.answer = answer;
    }

    public String getTypeCode() {
        return typeCode;
    }

    public void setTypeCode(String typeCode) {
        this.typeCode = typeCode;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Qa{" +
        "id=" + id +
        ", question=" + question +
        ", answer=" + answer +
        ", typeCode=" + typeCode +
        ", createTime=" + createTime +
        "}";
    }
}
